
function ph = ActionFun(params)

PN = params.PN;
D = params.D; % length of one side of square phase screen [m]
r0 = params.r0; % coherence diameter [m]
N = params.N; % number of grid points per side
L0 = params.L0; % outer scale [m] 
l0 = params.l0;% inner scale [m]
delta = D/N; % grid spacing [m]
p_num = params.p_num; % 次谐波补偿阶数


% generate a random draw of an atmospheric phase screen*sa```
ph = zeros(N,N,PN);
for loop=1:PN
    [phz_lo,phz_hi,~] ...
        = ft_sh_phase_screen(r0, N, delta, L0, l0, p_num);
    phz =  phz_hi+phz_lo; %高频加低频分量
    ph(:,:,loop)=phz;
end



end



